package code.android.util;

import java.util.Calendar;

import android.os.Environment;

public class AndroidUtil 
{
	public static String getExternalStorageName()
	{
		  String storageName = Environment.getExternalStorageDirectory().toString();
		  
		  return storageName;
	}
	
	public static boolean isSDCARDMounted()
	{
		boolean result = false;
		
        String status = Environment.getExternalStorageState();
       
        if (status.equals(Environment.MEDIA_MOUNTED))
        {
            result = true;
        }
        
        return result;
    }
	
	public static int getCurrentYear()
	{
		int year = 0;
		
		Calendar calendar = Calendar.getInstance();
		
		year = calendar.get(Calendar.YEAR);
		
		return year;
	}
	
	public static int getCurrentMonth()
	{
		int month = 0;
		
		Calendar calendar = Calendar.getInstance();
		
		month = calendar.get(Calendar.MONTH) + 1;
		
		return month;
	}
	
	public static int getCurrentDay()
	{
		int day = 0;
		
		Calendar calendar = Calendar.getInstance();
		
		day = calendar.get(Calendar.DAY_OF_MONTH);
		
		return day;
	}
	
	
	
}
